import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import store from './store';
import Vant from "vant";
import * as url from "@/api/url";
import "vant/lib/index.css";
import "./utils/amfe-flexible.js";
import "./assets/css/vant.css";
import "./assets/css/global.css";
import VueLazyLoad from 'vue-lazyload'//图片懒加载
import VueAwesomeSwiper from "vue-awesome-swiper";
import preview from 'vue-photo-preview'
import 'vue-photo-preview/dist/skin.css'
import VideoPlayer from "vue-video-player";//视频播放
import { Lazyload } from "vant";
import 'vant/lib/icon/local.css';
import "swiper/css/swiper.css";
import clipboard from 'clipboard'
import VueCookies from 'vue-cookies'


Vue.prototype.clipboard = clipboard
Vue.use(VueCookies)
Vue.use(preview)
Vue.use(Lazyload, {
  // loading: './assets/goodsDetails/serpeImg.png'
});
import {ImagePreview} from "vant";
Vue.use(ImagePreview);
import "video.js/dist/video-js.css";
Vue.config.productionTip = false
Vue.use(Vant);
Vue.use(VueAwesomeSwiper /* { default global options } */);
Vue.use(VideoPlayer);
Vue.prototype.URL = url;
// 注册 一个全局自定义指令'v-focus'
Vue.directive('focus',{
  // 当被绑定的元素插入到DOM中时
  inserted: function(el){
    // 聚焦元素
    el.focus();
  }
})
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
